home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
xcoral
/
xcoral.lha
/
xcoral-1.72
/
lex.yy.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-28
|
70KB
|
2,076 lines
/* A lexical scanner generated by flex */
/* scanner skeleton version:
* $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp $
*/
#define FLEX_SCANNER
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <osfcn.h>
/* use prototypes in function declarations */
#define YY_USE_PROTOS
/* the "const" storage-class-modifier is valid */
#define YY_USE_CONST
#else /* ! __cplusplus */
#ifdef __STDC__
#ifdef __GNUC__
#include <stddef.h>
void *malloc( size_t );
void free( void* );
#else
#include <stdlib.h>
#endif /* __GNUC__ */
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#define YY_USE_CONST
#endif
#ifndef YY_USE_CONST
#define const
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
/* we can't get here if it's an ANSI C compiler, or a C++ compiler,
* so it's got to be a K&R compiler, and therefore there's no standard
* place from which to include these definitions
*/
char *malloc();
int free();
int read();
#endif
/* amount of stuff to slurp up with each read */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* returned upon end-of-file */
#define YY_END_TOK 0
/* copy whatever the last rule matched to the standard output */
/* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
/* this used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite()
*/
#define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
/* gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#define YY_INPUT(buf,result,max_size) \
if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "read() in flex scanner failed" );
#define YY_NULL 0
/* no semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#define yyterminate() return ( YY_NULL )
/* report a fatal error */
/* The funky do-while is used to turn this macro definition into
* a single C statement (which needs a semi-colon terminator).
* This avoids problems with code like:
*
* if ( something_happens )
* YY_FATAL_ERROR( "oops, the something happened" );
* else
* everything_okay();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the YY_FATAL_ERROR() call.
*/
#define YY_FATAL_ERROR(msg) \
do \
{ \
(void) fputs( msg, stderr ); \
(void) putc( '\n', stderr ); \
exit( 1 ); \
} \
while ( 0 )
/* default yywrap function - always treat EOF as an EOF */
#define yywrap() 1
/* enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN
*/
#define BEGIN yy_start = 1 + 2 *
/* action number for EOF rule of a given start state */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* special action meaning "start processing a new file" */
#define YY_NEW_FILE \
do \
{ \
yy_init_buffer( yy_current_buffer, yyin ); \
yy_load_buffer_state(); \
} \
while ( 0 )
/* default declaration of generated scanner - a define so the user can
* easily add parameters
*/
#define YY_DECL int yylex YY_PROTO(( void ))
/* code executed at the end of each rule */
#define YY_BREAK break;
#define YY_END_OF_BUFFER_CHAR 0
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define YY_CHAR char
# line 1 "gen.l"
#define INITIAL 0
# line 2 "gen.l"
#include "global_parse.h"
#include "gen.tab.h"
extern YYSTYPE yylval;
#include "browser_util.h"
#include <string.h>
#include <ctype.h>
/*------------------------------------------------------------------------------
*/
int line_count;
static int bracket_level;
static int parent_level;
static int tmp_line_count;
static int virtual_flag;
static int const_flag;
/*------------------------------------------------------------------------------
*/
#define ARG_BUFF_SIZE 4096
static char arg_buff[ARG_BUFF_SIZE];
static int arg_index = 0;
/*------------------------------------------------------------------------------
*/
static int state_stack[20];
static int next_free;
static int current_state;
/*------------------------------------------------------------------------------
*/
#define LINE_COUNT() { \
char* current; \
\
current = yytext + yyleng; \
while ((--current) >= yytext) { \
if ((*current) == '\n') \
line_count++; \
} \
}
/*------------------------------------------------------------------------------
*/
#define BEGIN_STATE(state) BEGIN(current_state = state)
#define STACK_STATE(state) { state_stack[next_free++] = current_state; \
BEGIN_STATE(state); }
#define UNSTACK_STATE() { BEGIN_STATE(state_stack[--next_free]); }
#define YY_USER_INIT BEGIN_STATE(MAIN_STATE)
#define MAIN_STATE 1
#define OPERATOR_STATE 2
#define PROC_STATE1 3
#define PROC_STATE2 4
#define CLASS_STATE1 5
#define CLASS_STATE2 6
#define PARENT_STATE 7
#define BODY_STATE 8
#define ARG_STATE 9
#define INIT_STATE 10
#define TAIL_STATE 11
#define CODE_STATE 12
# line 119 "gen.l"
/* done after the current pattern has been matched and before the
* corresponding action - sets up yytext
*/
#define YY_DO_BEFORE_ACTION \
yytext = yy_bp; \
yyleng = yy_cp - yy_bp; \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* return all but the first 'n' matched characters back to the input stream */
#define yyless(n) \
do \
{ \
/* undo effects of setting up yytext */ \
*yy_cp = yy_hold_char; \
yy_c_buf_p = yy_cp = yy_bp + n; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext )
struct yy_buffer_state
{
FILE *yy_input_file;
YY_CHAR *yy_ch_buf; /* input buffer */
YY_CHAR *yy_buf_pos; /* current position in input buffer */
/* size of input buffer in bytes, not including room for EOB characters*/
int yy_buf_size;
/* number of characters read into yy_ch_buf, not including EOB characters */
int yy_n_chars;
int yy_eof_status; /* whether we've seen an EOF on this buffer */
#define EOF_NOT_SEEN 0
/* "pending" happens when the EOF has been seen but there's still
* some text process
*/
#define EOF_PENDING 1
#define EOF_DONE 2
};
static YY_BUFFER_STATE yy_current_buffer;
/* we provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state"
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed */
static YY_CHAR yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
#ifndef YY_USER_INIT
#define YY_USER_INIT
#endif
extern YY_CHAR *yytext;
extern int yyleng;
extern FILE *yyin, *yyout;
YY_CHAR *yytext;
int yyleng;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
#define YY_END_OF_BUFFER 75
typedef int yy_state_type;
static const short int yy_acclist[600] =
{ 0,
16442,16442, 75, 73, 74, 5, 73, 74, 4, 74,
73, 74, 68, 73, 74, 67, 73, 74, 73, 74,
72, 73, 74, 72, 73, 74, 72, 73, 74, 73,
74, 6, 73, 74, 6, 73, 74, 6, 73, 74,
73, 74, 6, 73, 74, 6, 73, 74, 6, 73,
74, 6, 73, 74, 6, 73, 74, 6, 73, 74,
6, 73, 74, 6, 73, 74, 6, 73, 74, 73,
74, 6, 73, 74, 6, 73, 74, 6, 73, 74,
6, 73, 74, 6, 73, 74, 8, 73, 74, 5,
8, 73, 74, 7, 8, 73, 74, 8, 73, 74,
8, 68, 73, 74, 8, 67, 73, 74, 8, 73,
74, 15, 73, 74, 5, 15, 73, 74, 15, 73,
74, 9, 15, 73, 74, 13, 15, 68, 73, 74,
14, 15, 73, 74, 12, 15, 73, 74, 12, 15,
73, 74, 10, 15, 67, 73, 74, 15, 73, 74,
17, 73, 74, 5, 17, 73, 74, 17, 73, 74,
17, 68, 73, 74, 16, 17, 73, 74, 17, 67,
73, 74, 17, 73, 74, 20, 73, 74, 5, 20,
73, 74, 20, 73, 74, 18, 20, 73, 74, 20,
68, 73, 74, 19, 20, 67, 73, 74, 20, 73,
74, 25, 73, 74, 25, 73, 74, 25, 73, 74,
26, 67, 73, 74, 72, 73, 74, 72, 73, 74,
72, 73, 74, 72, 73, 74, 72, 73, 74, 29,
73, 74, 41, 73, 74, 50, 73, 74, 51, 73,
74, 40, 73, 74, 43, 73, 74, 73, 74, 49,
73, 74, 48, 73, 74, 73, 74, 48, 73, 74,
48, 73, 74, 48, 73, 74, 48, 73, 74, 48,
73, 74, 48, 73, 74, 48, 73, 74, 48, 73,
74, 57, 73, 74, 5, 57, 73, 74, 57, 73,
74, 57, 73, 74, 54, 57, 73, 74, 56, 57,
73, 74, 55, 57, 73, 74, 57, 73, 74, 57,
68, 73, 74, 57, 73, 74, 57, 67, 73, 74,
57, 73, 74, 73, 74,16442, 5, 73, 74,16442,
4, 74,16442, 73, 74,16442, 8250, 68, 73, 74,
8250, 67, 73, 74, 73, 74,16442, 66, 73, 74,
5, 66, 73, 74, 73, 74, 63, 73, 74, 64,
73, 74, 66, 68, 73, 74, 66, 73, 74, 59,
67, 73, 74, 60, 73, 74, 66, 73, 74, 5,
1, 2, 3, 72, 72, 72, 72, 6, 6, 6,
6, 6, 6, 6, 6, 6, 12, 12, 16, 25,
25, 25, 25, 72, 72, 72, 72, 72, 72, 48,
42, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 52,16442, 8250, 5,16442, 1,16442,
2,16442,16442, 3,16442, 66, 5, 66, 65, 66,
3, 66, 2, 3, 70, 72, 72, 6, 6, 12,
25, 25, 25, 25, 72, 72, 72, 72, 72, 72,
47, 48, 48, 48, 48, 34, 48, 48, 48, 48,
48, 48, 48, 48, 48, 53, 2,16442, 2, 8250,
3,16442, 61, 62, 3, 66, 72, 72, 6, 12,
25, 25, 25, 25, 72, 72, 72, 72, 72, 72,
45, 48, 32, 48, 48, 48, 35, 48, 48, 48,
48, 48, 48, 48, 48, 69, 72, 72, 6, 11,
12, 25, 25, 25, 25, 72, 72, 72, 72, 72,
72, 38, 48, 39, 48, 48, 33, 48, 48, 48,
37, 48, 48, 48, 72, 25, 25, 21, 25, 25,
28, 72, 72, 72, 72, 21, 72, 72, 48, 31,
48, 36, 48, 48, 48, 72, 23, 25, 25, 24,
25, 28, 28, 72, 72, 23, 72, 72, 27, 72,
48, 48, 48, 71, 72, 25, 71, 72, 72, 44,
48, 30, 48, 46, 48, 22, 25, 22, 72
} ;
static const short int yy_accept[343] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2, 3, 3, 3, 4, 6, 9,
11, 13, 16, 19, 21, 24, 27, 30, 32, 35,
38, 41, 43, 46, 49, 52, 55, 58, 61, 64,
67, 70, 72, 75, 78, 81, 84, 87, 90, 94,
98, 101, 105, 109, 112, 115, 119, 122, 126, 131,
135, 139, 143, 148, 151, 154, 158, 161, 165, 169,
173, 176, 179, 183, 186, 190, 194, 199, 202, 205,
208, 211, 215, 218, 221, 224, 227, 230, 233, 236,
239, 242, 245, 248, 250, 253, 256, 258, 261, 264,
267, 270, 273, 276, 279, 282, 285, 289, 292, 295,
299, 303, 307, 310, 314, 317, 321, 324, 327, 331,
334, 337, 341, 345, 348, 351, 355, 357, 360, 363,
367, 370, 374, 377, 380, 381, 382, 383, 383, 384,
384, 385, 385, 386, 387, 387, 388, 389, 390, 391,
392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
402, 403, 404, 405, 406, 407, 408, 409, 410, 410,
411, 411, 412, 413, 414, 415, 416, 417, 418, 419,
420, 421, 422, 423, 424, 424, 425, 425, 425, 426,
427, 429, 431, 433, 434, 436, 437, 439, 439, 440,
440, 440, 440, 441, 443, 444, 445, 446, 447, 448,
449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
459, 460, 461, 462, 463, 464, 465, 466, 468, 469,
470, 471, 472, 473, 474, 475, 476, 477, 479, 481,
483, 484, 485, 487, 488, 489, 490, 491, 492, 493,
494, 495, 496, 497, 498, 499, 500, 501, 503, 505,
506, 507, 509, 510, 511, 512, 513, 514, 515, 516,
518, 519, 520, 522, 523, 524, 525, 526, 527, 528,
529, 530, 531, 532, 534, 536, 537, 539, 540, 541,
543, 544, 545, 546, 547, 548, 550, 551, 553, 554,
555, 556, 558, 559, 560, 562, 564, 565, 566, 567,
569, 570, 572, 573, 575, 576, 578, 579, 581, 582,
583, 584, 586, 587, 589, 590, 592, 594, 596, 598,
600, 600
} ;
static const YY_CHAR yy_ec[128] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 4, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 5, 6, 7, 1, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 20, 21, 22,
23, 24, 1, 1, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
26, 27, 28, 29, 25, 1, 30, 31, 32, 33,
34, 35, 36, 37, 38, 25, 25, 39, 25, 40,
41, 42, 25, 43, 44, 45, 46, 47, 48, 25,
25, 25, 49, 50, 51, 52, 1
} ;
static const YY_CHAR yy_meta[53] =
{ 0,
1, 2, 3, 2, 1, 4, 1, 1, 1, 4,
1, 1, 1, 1, 1, 1, 1, 4, 5, 6,
1, 1, 1, 1, 7, 1, 1, 1, 1, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 4, 1,
4, 1
} ;
static const short int yy_base[365] =
{ 0,
0, 2, 50, 721, 102, 720, 8, 25, 154, 719,
206, 718, 13, 52, 257, 697, 282, 696, 333, 695,
384, 432, 259, 405, 480, 530, 701, 966, 697, 966,
4, 966, 966, 4, 10, 38, 5, 35, 675, 674,
41, 684, 672, 42, 966, 247, 251, 2, 670, 37,
0, 664, 668, 656, 655, 260, 966, 966, 686, 966,
254, 966, 966, 65, 966, 685, 255, 966, 966, 966,
0, 645, 966, 74, 966, 683, 263, 966, 0, 966,
282, 966, 682, 375, 966, 966, 966, 307, 0, 2,
645, 966, 0, 639, 639, 20, 642, 966, 966, 966,
966, 966, 966, 661, 966, 0, 629, 610, 376, 615,
613, 618, 382, 611, 609, 966, 647, 73, 633, 966,
966, 966, 379, 966, 641, 966, 387, 379, 408, 382,
388, 966, 966, 580, 0, 644, 398, 365, 423, 0,
639, 966, 966, 628, 642, 966, 0, 420, 0, 458,
604, 622, 391, 406, 461, 0, 966, 966, 966, 628,
617, 616, 0, 599, 589, 0, 596, 0, 0, 408,
604, 591, 0, 595, 597, 410, 578, 565, 590, 0,
578, 966, 559, 573, 572, 560, 554, 558, 561, 555,
559, 551, 241, 554, 446, 966, 0, 582, 435, 966,
453, 445, 455, 0, 675, 0, 589, 461, 966, 0,
580, 579, 0, 705, 0, 0, 966, 431, 429, 554,
0, 543, 539, 540, 544, 535, 544, 534, 529, 530,
535, 528, 966, 531, 528, 526, 525, 0, 532, 529,
523, 525, 518, 522, 524, 531, 966, 466, 0, 0,
966, 966, 0, 441, 461, 515, 514, 528, 522, 517,
508, 513, 522, 520, 515, 509, 500, 0, 0, 501,
499, 0, 499, 497, 507, 507, 498, 499, 489, 491,
432, 494, 0, 482, 494, 493, 494, 490, 477, 476,
488, 487, 488, 0, 0, 472, 0, 483, 469, 0,
473, 474, 454, 477, 465, 0, 470, 753, 467, 472,
460, 0, 464, 465, 0, 0, 463, 450, 453, 0,
445, 0, 787, 0, 389, 0, 384, 0, 355, 299,
297, 227, 232, 0, 2, 0, 0, 0, 0, 0,
966, 835, 842, 849, 856, 863, 870, 876, 882, 888,
891, 894, 897, 900, 903, 906, 913, 920, 927, 934,
941, 948, 951, 958
} ;
static const short int yy_def[365] =
{ 0,
342, 342, 342, 3, 341, 5, 343, 343, 341, 9,
341, 11, 344, 344, 342, 15, 3, 17, 341, 19,
345, 345, 346, 346, 347, 347, 341, 341, 341, 341,
341, 341, 341, 348, 349, 349, 36, 350, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
351, 341, 341, 351, 351, 341, 341, 341, 341, 341,
341, 341, 341, 348, 341, 341, 341, 341, 341, 341,
352, 352, 341, 348, 341, 341, 341, 341, 353, 341,
348, 341, 341, 341, 341, 341, 341, 348, 354, 354,
354, 341, 355, 355, 355, 355, 355, 341, 341, 341,
341, 341, 341, 341, 341, 356, 357, 356, 356, 356,
356, 356, 356, 356, 356, 341, 341, 358, 341, 341,
341, 341, 341, 341, 341, 341, 348, 359, 359, 359,
359, 341, 341, 359, 360, 360, 361, 341, 341, 360,
360, 341, 341, 360, 341, 341, 362, 348, 363, 341,
36, 341, 36, 36, 350, 355, 341, 341, 341, 341,
341, 341, 351, 351, 351, 352, 352, 353, 354, 354,
354, 354, 355, 355, 355, 355, 355, 355, 341, 356,
357, 341, 356, 356, 356, 356, 356, 356, 356, 356,
356, 356, 356, 356, 358, 341, 358, 341, 359, 341,
359, 359, 364, 134, 134, 360, 360, 361, 341, 361,
341, 341, 144, 360, 362, 363, 341, 36, 36, 351,
351, 352, 354, 354, 354, 354, 355, 355, 355, 355,
355, 355, 341, 356, 356, 356, 356, 356, 356, 356,
356, 356, 356, 356, 356, 356, 341, 364, 362, 205,
341, 341, 214, 36, 36, 351, 352, 354, 354, 354,
354, 355, 355, 355, 355, 355, 355, 356, 356, 356,
356, 356, 356, 356, 356, 356, 356, 356, 356, 36,
36, 351, 352, 354, 354, 354, 354, 355, 355, 355,
355, 355, 355, 356, 356, 356, 356, 356, 356, 356,
356, 356, 36, 354, 354, 354, 354, 341, 355, 355,
355, 355, 355, 356, 356, 356, 356, 356, 36, 354,
354, 354, 308, 308, 355, 355, 355, 355, 356, 356,
356, 36, 354, 355, 355, 356, 356, 356, 354, 355,
0, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341
} ;
static const short int yy_nxt[1019] =
{ 0,
341, 29, 30, 29, 30, 148, 341, 148, 34, 59,
30, 150, 150, 150, 83, 30, 146, 31, 60, 31,
32, 147, 32, 161, 157, 61, 59, 30, 62, 152,
84, 64, 85, 86, 340, 60, 155, 155, 155, 150,
150, 150, 61, 151, 170, 62, 154, 171, 33, 157,
33, 29, 30, 83, 30, 157, 63, 152, 88, 157,
162, 87, 176, 158, 158, 177, 148, 31, 148, 84,
32, 85, 86, 63, 35, 148, 153, 148, 196, 35,
35, 36, 35, 35, 35, 35, 35, 35, 35, 35,
37, 35, 35, 35, 35, 35, 35, 35, 33, 197,
87, 38, 28, 29, 30, 28, 39, 28, 28, 40,
41, 28, 42, 28, 43, 44, 45, 46, 28, 47,
28, 28, 32, 48, 49, 50, 51, 52, 28, 28,
53, 51, 51, 51, 54, 51, 51, 51, 51, 51,
51, 55, 51, 51, 51, 51, 51, 51, 51, 51,
33, 56, 28, 57, 65, 66, 30, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 67, 65, 68, 69, 65, 70, 65, 71, 65,
65, 65, 65, 71, 71, 72, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 73, 65, 65, 65, 75, 76, 30, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 77, 75, 75, 78, 75, 75, 75,
79, 75, 75, 75, 75, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 80, 75, 75, 75, 29, 30,
129, 130, 157, 146, 339, 151, 146, 146, 147, 158,
160, 147, 147, 158, 31, 146, 131, 32, 244, 132,
147, 89, 158, 148, 245, 148, 89, 89, 89, 89,
89, 89, 89, 89, 89, 89, 89, 89, 90, 89,
89, 89, 89, 91, 89, 92, 93, 133, 148, 157,
148, 93, 93, 93, 93, 93, 94, 93, 93, 93,
93, 93, 95, 96, 93, 93, 93, 93, 97, 93,
338, 337, 98, 28, 29, 30, 28, 28, 28, 28,
28, 99, 28, 100, 101, 102, 28, 103, 28, 104,
31, 28, 28, 32, 28, 105, 28, 106, 107, 28,
28, 28, 108, 106, 109, 106, 106, 106, 106, 106,
110, 111, 106, 106, 106, 112, 113, 106, 114, 115,
106, 33, 28, 28, 28, 117, 30, 146, 148, 118,
148, 146, 147, 119, 120, 121, 147, 336, 122, 200,
202, 123, 200, 209, 124, 203, 129, 130, 200, 201,
125, 134, 184, 211, 185, 212, 186, 335, 190, 191,
218, 148, 131, 148, 210, 132, 192, 200, 200, 151,
200, 334, 126, 117, 30, 146, 200, 118, 127, 219,
147, 119, 120, 121, 151, 223, 122, 229, 224, 123,
230, 196, 124, 133, 201, 200, 200, 199, 125, 150,
150, 150, 155, 155, 155, 200, 209, 151, 199, 151,
151, 255, 197, 200, 254, 249, 303, 152, 333, 151,
126, 136, 30, 200, 280, 137, 249, 210, 331, 138,
281, 151, 151, 200, 319, 332, 330, 139, 329, 151,
140, 200, 328, 249, 327, 326, 141, 325, 322, 321,
320, 318, 317, 316, 249, 315, 314, 313, 312, 311,
310, 309, 308, 307, 306, 305, 304, 221, 142, 151,
143, 136, 30, 302, 301, 137, 144, 300, 299, 138,
298, 297, 296, 295, 294, 293, 292, 139, 291, 290,
140, 289, 288, 287, 286, 285, 141, 284, 283, 282,
279, 278, 277, 276, 275, 274, 273, 272, 271, 270,
269, 268, 267, 266, 265, 264, 263, 262, 142, 261,
143, 204, 260, 204, 259, 258, 257, 256, 252, 251,
207, 247, 246, 243, 242, 241, 240, 239, 238, 237,
200, 236, 235, 234, 205, 182, 233, 232, 231, 205,
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
205, 205, 205, 205, 205, 205, 205, 205, 200, 213,
228, 213, 227, 226, 225, 222, 221, 220, 157, 157,
159, 217, 151, 145, 209, 207, 196, 198, 145, 194,
193, 189, 214, 188, 187, 183, 182, 214, 214, 214,
214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
214, 214, 214, 214, 214, 214, 199, 179, 199, 178,
175, 174, 172, 145, 145, 167, 145, 145, 165, 164,
158, 159, 157, 250, 158, 159, 158, 157, 145, 250,
341, 34, 34, 34, 250, 250, 250, 250, 250, 250,
250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
250, 250, 250, 253, 81, 74, 34, 34, 341, 253,
341, 341, 341, 341, 253, 253, 253, 253, 253, 253,
253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
253, 253, 253, 323, 323, 323, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
323, 324, 323, 341, 323, 323, 323, 324, 323, 323,
323, 323, 324, 324, 324, 324, 324, 324, 324, 324,
324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
324, 341, 323, 323, 323, 323, 341, 341, 341, 341,
341, 323, 341, 341, 341, 341, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
323, 323, 323, 323, 323, 28, 28, 28, 28, 28,
28, 28, 58, 58, 58, 58, 58, 58, 58, 82,
82, 82, 82, 82, 82, 82, 116, 116, 116, 116,
116, 116, 116, 128, 128, 128, 128, 128, 128, 128,
135, 135, 135, 135, 135, 135, 135, 149, 341, 341,
341, 341, 149, 151, 151, 341, 151, 151, 151, 156,
156, 341, 341, 341, 156, 163, 341, 163, 166, 341,
166, 168, 341, 168, 169, 341, 169, 173, 341, 173,
180, 341, 180, 181, 181, 181, 181, 181, 181, 181,
195, 195, 341, 195, 195, 195, 195, 199, 199, 199,
199, 199, 199, 199, 206, 206, 341, 341, 206, 206,
206, 208, 208, 341, 208, 208, 208, 208, 215, 215,
341, 215, 215, 215, 215, 216, 341, 216, 248, 248,
248, 248, 248, 248, 248, 27, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341
} ;
static const short int yy_chk[1019] =
{ 0,
0, 1, 1, 2, 2, 34, 0, 34, 2, 7,
7, 35, 35, 35, 13, 13, 31, 1, 7, 2,
1, 31, 2, 48, 48, 7, 8, 8, 7, 35,
13, 8, 13, 13, 335, 8, 38, 38, 38, 36,
36, 36, 8, 37, 90, 8, 37, 90, 1, 41,
2, 3, 3, 14, 14, 44, 7, 36, 14, 50,
50, 13, 96, 41, 44, 96, 64, 3, 64, 14,
3, 14, 14, 8, 3, 74, 36, 74, 118, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 118,
14, 3, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 15, 15,
23, 23, 46, 47, 333, 332, 61, 67, 47, 46,
46, 61, 67, 47, 15, 77, 23, 15, 193, 23,
77, 15, 56, 81, 193, 81, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 17, 23, 88, 56,
88, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
331, 330, 17, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 21, 21, 84, 127, 21,
127, 123, 84, 21, 21, 21, 123, 329, 21, 128,
131, 21, 130, 137, 21, 131, 24, 24, 131, 129,
21, 24, 109, 138, 109, 138, 109, 327, 113, 113,
153, 148, 24, 148, 137, 24, 113, 128, 129, 153,
130, 325, 21, 22, 22, 139, 131, 22, 22, 154,
139, 22, 22, 22, 154, 170, 22, 176, 170, 22,
176, 195, 22, 24, 201, 199, 129, 203, 22, 150,
150, 150, 155, 155, 155, 202, 208, 219, 248, 218,
281, 219, 195, 201, 218, 203, 281, 150, 321, 254,
22, 25, 25, 199, 254, 25, 248, 208, 318, 25,
255, 319, 303, 202, 303, 319, 317, 25, 314, 255,
25, 201, 313, 203, 311, 310, 25, 309, 307, 305,
304, 302, 301, 299, 248, 298, 296, 293, 292, 291,
290, 289, 288, 287, 286, 285, 284, 282, 25, 280,
25, 26, 26, 279, 278, 26, 26, 277, 276, 26,
275, 274, 273, 271, 270, 267, 266, 26, 265, 264,
26, 263, 262, 261, 260, 259, 26, 258, 257, 256,
246, 245, 244, 243, 242, 241, 240, 239, 237, 236,
235, 234, 232, 231, 230, 229, 228, 227, 26, 226,
26, 134, 225, 134, 224, 223, 222, 220, 212, 211,
207, 198, 194, 192, 191, 190, 189, 188, 187, 186,
134, 185, 184, 183, 134, 181, 179, 178, 177, 134,
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
134, 134, 134, 134, 134, 134, 134, 134, 134, 144,
175, 144, 174, 172, 171, 167, 165, 164, 162, 161,
160, 152, 151, 145, 141, 136, 125, 119, 117, 115,
114, 112, 144, 111, 110, 108, 107, 144, 144, 144,
144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
144, 144, 144, 144, 144, 144, 205, 104, 205, 97,
95, 94, 91, 83, 76, 72, 66, 59, 55, 54,
53, 52, 49, 205, 43, 42, 40, 39, 29, 205,
27, 20, 18, 16, 205, 205, 205, 205, 205, 205,
205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
205, 205, 205, 214, 12, 10, 6, 4, 0, 214,
0, 0, 0, 0, 214, 214, 214, 214, 214, 214,
214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
214, 214, 214, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 0, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
308, 0, 308, 308, 308, 323, 0, 0, 0, 0,
0, 323, 0, 0, 0, 0, 323, 323, 323, 323,
323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
323, 323, 323, 323, 323, 342, 342, 342, 342, 342,
342, 342, 343, 343, 343, 343, 343, 343, 343, 344,
344, 344, 344, 344, 344, 344, 345, 345, 345, 345,
345, 345, 345, 346, 346, 346, 346, 346, 346, 346,
347, 347, 347, 347, 347, 347, 347, 348, 0, 0,
0, 0, 348, 349, 349, 0, 349, 349, 349, 350,
350, 0, 0, 0, 350, 351, 0, 351, 352, 0,
352, 353, 0, 353, 354, 0, 354, 355, 0, 355,
356, 0, 356, 357, 357, 357, 357, 357, 357, 357,
358, 358, 0, 358, 358, 358, 358, 359, 359, 359,
359, 359, 359, 359, 360, 360, 0, 0, 360, 360,
360, 361, 361, 0, 361, 361, 361, 361, 362, 362,
0, 362, 362, 362, 362, 363, 0, 363, 364, 364,
364, 364, 364, 364, 364, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
341, 341, 341, 341, 341, 341, 341, 341
} ;
static yy_state_type yy_last_accepting_state;
static YY_CHAR *yy_last_accepting_cpos;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static YY_CHAR *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
yy_state_ptr = yy_full_state; /* restore orig. state */ \
yy_current_state = *yy_state_ptr; /* restore curr. state */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
/* these variables are all declared out here so that section 3 code can
* manipulate them
*/
/* points to current character in buffer */
static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
#define yy_new_buffer yy_create_buffer
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
YY_DECL
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp, *yy_bp;
register int yy_act;
/************************************************************************************/
/* la supression des commentaires et macros */
/************************************************************************************/
if ( yy_init )
{
YY_USER_INIT;
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( yy_current_buffer )
yy_init_buffer( yy_current_buffer, yyin );
else
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
yy_init = 0;
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* support of yytext */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of the
* current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
if ( yy_bp[-1] == '\n' )
++yy_current_state;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[*yy_cp];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 342 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*yy_state_ptr++ = yy_current_state;
++yy_cp;
}
while ( yy_current_state != 341 );
yy_find_action:
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backtracking */
for ( ; ; ) /* until we find what rule we matched */
{
if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
{
yy_act = yy_acclist[yy_lp];
if ( yy_act & YY_TRAILING_HEAD_MASK ||
yy_looking_for_trail_begin )
{
if ( yy_act == yy_looking_for_trail_begin )
{
yy_looking_for_trail_begin = 0;
yy_act &= ~YY_TRAILING_HEAD_MASK;
break;
}
}
else if ( yy_act & YY_TRAILING_MASK )
{
yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
}
else
{
yy_full_match = yy_cp;
yy_full_state = yy_state_ptr;
yy_full_lp = yy_lp;
break;
}
++yy_lp;
goto find_rule;
}
--yy_cp;
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
YY_USER_ACTION;
do_action: /* this label is used only to access EOF actions */
switch ( yy_act )
{
case 1:
# line 125 "gen.l"
{
int current;
current = '\0';
while (current != '/') {
while (current != '*') {
current = input();
if (current == '\n')
line_count++;
else if (current == EOF)
yyterminate ();
}
current = input();
if (current == '\n')
line_count++;
else if (current == EOF)
yyterminate ();
}
}
YY_BREAK
case 2:
# line 146 "gen.l"
{}
YY_BREAK
case 3:
# line 149 "gen.l"
{
int current;
int previous;
previous = '\\';
while (previous == '\\') {
current = '\0';
while (current != '\n') {
previous = current;
current = input();
if (current == EOF )
yyterminate ();
}
line_count++;
}
}
YY_BREAK
case 4:
# line 167 "gen.l"
{ line_count++; }
YY_BREAK
case 5:
# line 170 "gen.l"
{}
YY_BREAK
/************************************************************************************/
/* le parcours de la liste des arguments d'une procedure ou d'une methode */
/************************************************************************************/
case 6:
# line 177 "gen.l"
{
strcat(yylval.text, yytext);
strcat(yylval.text, " ");
BEGIN_STATE(PROC_STATE1);
}
YY_BREAK
/************************************************************************************/
/* le parcours de la liste des arguments d'une procedure ou d'une methode */
/************************************************************************************/
case 7:
# line 188 "gen.l"
{
int current;
int parent_level;
arg_index = 0;
parent_level = 1;
tmp_line_count = 0;
arg_buff[arg_index++] = '(';
while(parent_level != 0) {
current = input();
switch(current) {
case EOF: yyterminate ();
break;
case '(' : parent_level++;
break;
case ')' : parent_level--;
break;
}
if (current == '\n')
tmp_line_count++;
if (arg_index < ARG_BUFF_SIZE)
arg_buff[arg_index++] = current;
else {
yylval.position = line_count;
return(LEX_ERROR_TOK);
}
}
const_flag = False;
BEGIN_STATE(PROC_STATE2);
}
YY_BREAK
case 8:
# line 219 "gen.l"
{
unput(yytext[0]);
UNSTACK_STATE();
if (current_state != BODY_STATE)
*yy_class_name = '\0';
}
YY_BREAK
/************************************************************************************/
/* la recherche du token qui suit la liste des arguments */
/************************************************************************************/
case 9:
# line 231 "gen.l"
{
while (--arg_index >= 0)
unput(arg_buff[arg_index]);
parent_level = 0;
yylval.is_virtual = virtual_flag;
virtual_flag = False;
BEGIN_STATE(ARG_STATE);
return(CPLUS_TOK);
}
YY_BREAK
case 10:
# line 242 "gen.l"
{
unput('{');
while (--arg_index >= 0)
unput(arg_buff[arg_index]);
parent_level = 0;
yylval.is_virtual = virtual_flag;
virtual_flag = False;
BEGIN_STATE(ARG_STATE);
return(CPLUS_TOK);
}
YY_BREAK
case 11:
# line 254 "gen.l"
{ const_flag = True; }
YY_BREAK
case 12:
# line 257 "gen.l"
{
line_count += tmp_line_count;
virtual_flag = False;
UNSTACK_STATE();
return(C_TOK);
}
YY_BREAK
case 13:
# line 265 "gen.l"
{
unput(';');
UNSTACK_STATE();
if (current_state == BODY_STATE) {
while (--arg_index >= 0)
unput(arg_buff[arg_index]);
parent_level = 0;
yylval.is_virtual = virtual_flag;
virtual_flag = False;
STACK_STATE(ARG_STATE);
return(DECL_TOK);
}
else
line_count += tmp_line_count;
virtual_flag = False;
}
YY_BREAK
case 14:
# line 283 "gen.l"
{
unput('=');
UNSTACK_STATE();
if (current_state == BODY_STATE) {
while (--arg_index >= 0)
unput(arg_buff[arg_index]);
parent_level = 0;
yylval.is_virtual = virtual_flag;
virtual_flag = False;
STACK_STATE(ARG_STATE);
return(DECL_TOK);
}
else
line_count += tmp_line_count;
virtual_flag = False;
}
YY_BREAK
case 15:
# line 301 "gen.l"
{
unput(yytext[0]);
line_count += tmp_line_count;
virtual_flag = False;
UNSTACK_STATE();
}
YY_BREAK
/************************************************************************************/
/* La lecture du nom de la classe */
/************************************************************************************/
case 16:
# line 313 "gen.l"
{
strcpy(yylval.text, yytext);
yylval.position = line_count;
BEGIN_STATE(CLASS_STATE2);
}
YY_BREAK
case 17:
# line 320 "gen.l"
{ unput(yytext[0]); BEGIN_STATE(MAIN_STATE); }
YY_BREAK
case 18:
# line 323 "gen.l"
{
BEGIN_STATE(PARENT_STATE);
return(IDENT_TOK);
}
YY_BREAK
case 19:
# line 328 "gen.l"
{
unput('{');
BEGIN_STATE(PARENT_STATE);
return(IDENT_TOK);
}
YY_BREAK
case 20:
# line 334 "gen.l"
{ unput(yytext[0]); BEGIN_STATE(MAIN_STATE); }
YY_BREAK
/************************************************************************************/
/* Quelques mots clefs */
/************************************************************************************/
case 21:
# line 341 "gen.l"
{ return(PUBLIC_TOK); }
YY_BREAK
case 22:
# line 343 "gen.l"
{ return(PROTECTED_TOK); }
YY_BREAK
case 23:
# line 345 "gen.l"
{ return(PRIVATE_TOK); }
YY_BREAK
/************************************************************************************/
/* La lecture de la liste des parents */
/************************************************************************************/
case 24:
# line 352 "gen.l"
{}
YY_BREAK
case 25:
# line 354 "gen.l"
{
strcpy(yylval.text, yytext);
yylval.position = line_count;
return(IDENT_TOK);
}
YY_BREAK
case 26:
# line 360 "gen.l"
{ BEGIN_STATE(BODY_STATE); return '{'; }
YY_BREAK
/************************************************************************************/
/* La lecture des "members" declares dans une classe */
/************************************************************************************/
case 27:
# line 367 "gen.l"
{ virtual_flag = True; }
YY_BREAK
case 28:
# line 369 "gen.l"
{ LINE_COUNT(); }
YY_BREAK
case 29:
# line 371 "gen.l"
{
*yy_class_name = '\0';
BEGIN_STATE(MAIN_STATE);
return('}');
}
YY_BREAK
/************************************************************************************/
/* La lecture de la liste des arguments d'une methode ou d'une procedure */
/************************************************************************************/
case 30:
# line 382 "gen.l"
{ return(UNSIGNED_TOK); }
YY_BREAK
case 31:
# line 384 "gen.l"
{ return(SIGNED_TOK); }
YY_BREAK
case 32:
# line 386 "gen.l"
{ return(CHAR_TOK); }
YY_BREAK
case 33:
# line 388 "gen.l"
{ return(SHORT_TOK); }
YY_BREAK
case 34:
# line 390 "gen.l"
{ return(INT_TOK); }
YY_BREAK
case 35:
# line 392 "gen.l"
{ return(LONG_TOK); }
YY_BREAK
case 36:
# line 394 "gen.l"
{ return(STRUCT_TOK); }
YY_BREAK
case 37:
# line 396 "gen.l"
{ return(UNION_TOK); }
YY_BREAK
case 38:
# line 398 "gen.l"
{ return(CLASS_TOK); }
YY_BREAK
case 39:
# line 400 "gen.l"
{ return(CONST_TOK); }
YY_BREAK
case 40:
# line 402 "gen.l"
{ return('*'); }
YY_BREAK
case 41:
# line 404 "gen.l"
{ return('&'); }
YY_BREAK
case 42:
# line 406 "gen.l"
{ LINE_COUNT(); return(ARRAY_TOK); }
YY_BREAK
case 43:
# line 408 "gen.l"
{ return(','); }
YY_BREAK
case 44:
# line 410 "gen.l"
{}
YY_BREAK
case 45:
# line 412 "gen.l"
{}
YY_BREAK
case 46:
# line 414 "gen.l"
{}
YY_BREAK
case 47:
# line 417 "gen.l"
{
strcpy(yylval.text, yytext);
return(IDENT_TOK);
}
YY_BREAK
case 48:
# line 423 "gen.l"
{
strcpy(yylval.text, yytext);
return(IDENT_TOK);
}
YY_BREAK
case 49:
# line 429 "gen.l"
{ BEGIN_STATE(INIT_STATE); }
YY_BREAK
case 50:
# line 432 "gen.l"
{
parent_level++;
return('(');
}
YY_BREAK
case 51:
# line 438 "gen.l"
{
if ((--parent_level) == 0)
BEGIN_STATE(TAIL_STATE);
return(')');
}
YY_BREAK
case 52:
# line 445 "gen.l"
{}
YY_BREAK
case 53:
# line 448 "gen.l"
{}
YY_BREAK
case 54:
# line 451 "gen.l"
{
int parent_level;
char current;
parent_level = 1;
while (parent_level != 0) {
current = input();
switch(current) {
case EOF: yyterminate ();
break;
case '(' : parent_level++;
break;
case ')' : parent_level--;
break;
}
}
}
YY_BREAK
case 55:
# line 470 "gen.l"
{ unput(','); BEGIN_STATE(ARG_STATE); }
YY_BREAK
case 56:
# line 473 "gen.l"
{ unput(')'); BEGIN_STATE(ARG_STATE); }
YY_BREAK
case 57:
# line 476 "gen.l"
{}
YY_BREAK
/************************************************************************************/
/* Les Divers */
/************************************************************************************/
case 58:
# line 483 "gen.l"
{
LINE_COUNT();
UNSTACK_STATE();
if (const_flag == True) {
const_flag = False;
return(CONST_TOK);
}
}
YY_BREAK
/************************************************************************************/
/* Les Divers */
/************************************************************************************/
case 59:
# line 497 "gen.l"
{ bracket_level++; }
YY_BREAK
case 60:
# line 499 "gen.l"
{
if ((--bracket_level) == 0) {
UNSTACK_STATE();
return(SYNC_TOK);
}
}
YY_BREAK
case 61:
# line 506 "gen.l"
{}
YY_BREAK
case 62:
# line 508 "gen.l"
{}
YY_BREAK
case 63:
# line 510 "gen.l"
{}
YY_BREAK
case 64:
# line 512 "gen.l"
{}
YY_BREAK
case 65:
# line 514 "gen.l"
{}
YY_BREAK
case 66:
# line 516 "gen.l"
{}
YY_BREAK
case 67:
# line 518 "gen.l"
{
bracket_level = 1;
STACK_STATE(CODE_STATE);
}
YY_BREAK
case 68:
# line 524 "gen.l"
{ return(SYNC_TOK); }
YY_BREAK
/************************************************************************************/
case 69:
# line 529 "gen.l"
{
BEGIN_STATE(CLASS_STATE1);
}
YY_BREAK
case 70:
# line 534 "gen.l"
{
char* current;
current = yytext + yyleng - 2;
while ((--current) >= yytext) {
if (isspace(*current)) {
if ((*current) == '\n')
line_count++;
}
else
break;
}
*(current + 1) = '\0';
strcpy(yy_class_name, yytext);
}
YY_BREAK
case 71:
# line 551 "gen.l"
{
strcpy(yylval.text, "operator ");
yylval.position = line_count;
STACK_STATE(OPERATOR_STATE);
}
YY_BREAK
case 72:
# line 558 "gen.l"
{
if ( yytext[0] != '~' )
strcpy(yylval.text, yytext);
else {
register char *p = yytext + 1;
yylval.text [0]= '~';
while ( isspace( *p ) )
p++;
strcpy(&(yylval.text[1]), p );
LINE_COUNT();
}
yylval.position = line_count;
STACK_STATE(PROC_STATE1);
}
YY_BREAK
case 73:
# line 574 "gen.l"
{}
YY_BREAK
/************************************************************************************/
case 74:
# line 579 "gen.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(MAIN_STATE):
case YY_STATE_EOF(OPERATOR_STATE):
case YY_STATE_EOF(PROC_STATE1):
case YY_STATE_EOF(PROC_STATE2):
case YY_STATE_EOF(CLASS_STATE1):
case YY_STATE_EOF(CLASS_STATE2):
case YY_STATE_EOF(PARENT_STATE):
case YY_STATE_EOF(BODY_STATE):
case YY_STATE_EOF(ARG_STATE):
case YY_STATE_EOF(INIT_STATE):
case YY_STATE_EOF(TAIL_STATE):
case YY_STATE_EOF(CODE_STATE):
yyterminate();
case YY_END_OF_BUFFER:
{
/* amount of text matched not including the EOB char */
int yy_amount_of_matched_text = yy_cp - yytext - 1;
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
/* note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the end-
* of-buffer state). Contrast this with the test in yyinput().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* this was really a NUL */
{
yy_state_type yy_next_state;
yy_c_buf_p = yytext + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* okay, we're now positioned to make the
* NUL transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we
* don't want to build jamming into it because
* then it will run more slowly)
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext + YY_MORE_ADJ;
if ( yy_next_state )
{
/* consume the NUL */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* note: because we've taken care in
* yy_get_next_buffer() to have set up yytext,
* we can now set up yy_c_buf_p so that if some
* total hoser (like flex itself) wants
* to call the scanner after we return the
* YY_NULL, it'll still work - another YY_NULL
* will get returned.
*/
yy_c_buf_p = yytext + YY_MORE_ADJ;
yy_act = YY_STATE_EOF((yy_start - 1) / 2);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
}
break;
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
#ifdef FLEX_DEBUG
printf( "action # %d\n", yy_act );
#endif
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
}
}
}
/* yy_get_next_buffer - try to read in a new buffer
*
* synopsis
* int yy_get_next_buffer();
*
* returns a code representing an action
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
/* try to read more data */
/* first move last chars to start of buffer */
number_to_move = yy_c_buf_p - yytext;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_n_chars = 0;
else
{
int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
else if ( num_to_read <= 0 )
YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
/* read in more data */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == 1 )
{
ret_val = EOB_ACT_END_OF_FILE;
yy_current_buffer->yy_eof_status = EOF_DONE;
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_eof_status = EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
/* yytext begins at the second character in yy_ch_buf; the first
* character is the one which preceded it before reading in the latest
* buffer; it needs to be kept around in case it's a newline, so
* yy_get_previous_state() will have with '^' rules active
*/
yytext = &yy_current_buffer->yy_ch_buf[1];
return ( ret_val );
}
/* yy_get_previous_state - get the state just before the EOB char was reached
*
* synopsis
* yy_state_type yy_get_previous_state();
*/
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp;
register YY_CHAR *yy_bp = yytext;
yy_current_state = yy_start;
if ( yy_bp[-1] == '\n' )
++yy_current_state;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 342 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*yy_state_ptr++ = yy_current_state;
}
return ( yy_current_state );
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
register yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 342 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*yy_state_ptr++ = yy_current_state;
yy_is_jam = (yy_current_state == 341);
return ( yy_is_jam ? 0 : yy_current_state );
}
#ifdef YY_USE_PROTOS
static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
#else
static void yyunput( c, yy_bp )
YY_CHAR c;
register YY_CHAR *yy_bp;
#endif
{
register YY_CHAR *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
register YY_CHAR *dest =
&yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
register YY_CHAR *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += dest - source;
yy_bp += dest - source;
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
yy_cp[-2] = '\n';
*--yy_cp = c;
/* note: the formal parameter *must* be called "yy_bp" for this
* macro to now work correctly
*/
YY_DO_BEFORE_ACTION; /* set up yytext again */
}
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
YY_CHAR *yy_cp = yy_c_buf_p;
*yy_cp = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* this was really a NUL */
*yy_c_buf_p = '\0';
else
{ /* need more input */
yytext = yy_c_buf_p;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
{
yy_c_buf_p = yytext + YY_MORE_ADJ;
return ( EOF );
}
YY_NEW_FILE;
#ifdef __cplusplus
return ( yyinput() );
#else
return ( input() );
#endif
}
break;
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext + YY_MORE_ADJ;
break;
case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
YY_FATAL_ERROR( "unexpected last match in yyinput()" );
#else
YY_FATAL_ERROR( "unexpected last match in input()" );
#endif
}
}
}
c = *yy_c_buf_p;
yy_hold_char = *++yy_c_buf_p;
return ( c );
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* flush out information for old buffer */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* we don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
yy_init_buffer( b, file );
return ( b );
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
free( (char *) b->yy_ch_buf );
free( (char *) b );
}
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
b->yy_input_file = file;
/* we put in the '\n' and start reading from [1] so that an
* initial match-at-newline will be true.
*/
b->yy_ch_buf[0] = '\n';
b->yy_n_chars = 1;
/* we always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[1];
b->yy_eof_status = EOF_NOT_SEEN;
}
# line 579 "gen.l"
void flex_init(file)
FILE* file;
{
static int first_call = 1;
line_count = 1;
next_free = 0;
virtual_flag = False;
yyin = file;
yy_init = 1;
yy_start = 0;
if (first_call == 1)
first_call = 0;
else
yyrestart (file);
}